package com.xinbochuang.machine.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xinbochuang.machine.admin.domain.AlarmCount;
import com.xinbochuang.machine.admin.domain.CameraInoutRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 杜文博
 * @date 2020-10-29
 */
public interface CameraInoutRecordMapper extends BaseMapper<CameraInoutRecord> {

    IPage<CameraInoutRecord> getCameraInoutByCameraId(Page page, @Param("cameraId") String cameraId);

    /**
     * 今日出入数量统计
     *
     * @return 结果
     */
    int selectInoutCountToday();

    /**
     * 机房进出统计
     *
     * @param deptId 公司id
     * @param week   日期
     * @return 结果
     */
    List<AlarmCount> selectInoutCount(@Param("deptId") int deptId, @Param("week") List<String> week);
}
